FROM alpine:3.12.0

COPY cert_exporter /
#COPY --from=build-env /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/

ENV TZ "Asia/Shanghai"
RUN  sed -i 's/dl-cdn.alpinelinux.org/mirrors.aliyun.com/g' /etc/apk/repositories && \
     apk add --no-cache tzdata && \
     addgroup -g 1000 nonroot && \
     adduser -u 1000 -D -H -G nonroot nonroot && \
     chown -R nonroot:nonroot /cert_exporter
USER nonroot:nonroot

ENTRYPOINT ["/cert_exporter"]